import Https from '@/utils/https'

// 获取离线同步任务统计信息
const getSummary = (params) => Https.get('/api/v1/integration/online/getSummary', params)
// 发布任务
const publish = (params) => Https.get('/api/v1/integration/online/publish', params, { needCode: true })
// 下线任务
const unPublish = (params) => Https.get('/api/v1/integration/online/unPublish', params, { needCode: true })
// 删除任务
const deleteOnline = (params) => Https.get('/api/v1/integration/online/delete', params, { needCode: true })
// 重跑
const reRun = (params) => Https.get('/api/v1/integration/online/reRun', params, { needCode: true })

const getDirList = (params) => Https.get('/api/v1/integration/online/getDirList', params, { needCode: true })

const upsetDir = (params) => Https.post('/api/v1/integration/online/upsetDir', params, { needCode: true })

const deleteDir = (params) => Https.get('/api/v1/integration/online/deleteDir', params, { needCode: true })

const onlineTaskLog = (params) => Https.get('/api/v1/integration/online/task/log', params, { needCode: true })

export {
  getSummary, publish, unPublish, deleteOnline, reRun, deleteDir, upsetDir, getDirList, onlineTaskLog,
}
